﻿<%-- 
    Document   : findlist.jsp
    Created on : 2011-12-10, 10:48:34
    Author     : Administrator
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">   

        <link href="divcss5.css" rel="stylesheet" media="screen" type="text/css" />
        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/css.css" />
        <script language="javascript" type="text/javascript" src="${pageContext.request.contextPath}/document/j.js" ></script>
        <link href="${pageContext.request.contextPath}/css/cont.css" rel="stylesheet" type="text/css"/>
        <script type='text/javascript' src='${pageContext.request.contextPath}/dwr/interface/CountryDAO.js'></script>
        <script type='text/javascript' src='${pageContext.request.contextPath}/dwr/interface/ProductDAO.js'></script>
        <script type='text/javascript' src='${pageContext.request.contextPath}/dwr/interface/DocumentTypeDAO.js'></script>
        <script type='text/javascript' src='${pageContext.request.contextPath}/dwr/interface/DocumentGroupDAO.js'></script>
     <script type='text/javascript' src='${pageContext.request.contextPath}/dwr/engine.js'></script>
        <script type='text/javascript' src='${pageContext.request.contextPath}/dwr/util.js'></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/zcms/jquery-1.6.1.min.js"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/js/cont_diqu.js"></script>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>单证检索</title>
        <!--  <script type="text/javascript" src="../../js/jquery.ztree.excheck-3.0.js"></script>
          <script type="text/javascript" src="../../js/jquery.ztree.exedit-3.0.js"></script>-->
        <style type="text/css"> 
            *{ padding:0; margin:0; list-style-type:none;} 
            body{font-family: "宋体";font-size: 12px;} 
            #t_con1{ float:left;width:80px; line-height:25px; height:25px;color:#00F; cursor:pointer;border:1px #cccccc solid; text-align:center;} 
            #t_area1{ position:absolute;width:528px; overflow:hidden; border:3px #AAADA8 solid; background-color:#ffffff; top:25px; left:-452px;padding-bottom:10px;display:none; } 
            #t_area1 ul{} 
            #t_area1 li{ width:60px; height:25px; float:left; display:inline;  text-align:left!important; line-height:25px; margin:4px auto auto 5px; } 
            #t_area1 li a:link,#t_area1 li a:visited{ color:#444444; text-decoration:none; text-align:left!important} 
            #t_area1 li a:hover{ color:#ff0000; text-decoration:none; text-align:left!important} 

            #t_con2{ float:left;width:100px; line-height:25px; height:25px;color:#00F; cursor:pointer;border:1px #cccccc solid; text-align:center;} 
            #t_area2{ position:absolute;width:268px; overflow:hidden; border:2px #cccccc solid; background-color:#ffffff; top:20px; left:0;padding-bottom:10px;display:none; } 
            #t_area2 ul{} 
            #t_area2 li{ width:60px; height:18px; float:left; display:inline; text-align:center; line-height:25px; margin:4px auto auto 5px; } 
            #t_area2 li a:link,#t_area2 li a:visited{ color:#444444;text-decoration:none;} 
            #t_area2 li a:hover{ color:#ff0000; text-decoration:none;} 
        </style>

<script type="text/javascript">
    function check1(){
          document.form1.submit();
    }
     
</script>
        <script type="text/javascript"> 
            String.prototype.dTrim = function() {
                return this.replace(/(^\s*)|(\s*$)/g, "");
            }
            function showarea1(){ 
                var con = document.getElementById("t_area1"); 
                var arealist = con.getElementsByTagName("a");
                var g = document.getElementById("t_con1") 
                con.style.display = "block"; 
                for (var i=0;i<arealist.length;i++){ 
                    arealist[i].onclick = function(){
                        if(this.innerText.dTrim()=="所有(清空条件)")
                        {
                            document.getElementById("t_con1").innerText="";
                        }else
                            g.innerText = this.innerText ; 
                        con.style.display = "none"; 
                    } 
                } 
            } 
            function offarea1(){ 
                var con = document.getElementById("t_area1"); 
                con.style.display = "none"; 
            } 
            var timer1; 
        </script> 
        <script language="javascript">
            function isIE(){ //ie? 
                if (window.navigator.userAgent.toLowerCase().indexOf("msie")>=1) 
                    return true; 
                else 
                    return false; 
            } 

            if(!isIE()){ //firefox innerText define
                HTMLElement.prototype.__defineGetter__(     "innerText", 
                function(){
                    var anyString = "";
                    var childS = this.childNodes;
                    for(var i=0; i<childS.length; i++) {
                        if(childS[i].nodeType==1)
                            anyString += childS[i].tagName=="BR" ? '\n' : childS[i].textContent;
                        else if(childS[i].nodeType==3)
                            anyString += childS[i].nodeValue;
                    }
                    return anyString;
                } 
            ); 
                HTMLElement.prototype.__defineSetter__(     "innerText", 
                function(sText){ 
                    this.textContent=sText; 
                } 
            ); 
            }
        </script>
        <script>

            function check()
            {
                //var producetname=  document.getElementById('text5').innerText;
             
                //var countryname= document.getElementById('text').innerText;
                var producetname = "";
                var countryname = "";
                var groupname = document.getElementById("text1").innerText ;
               
             
                var typename = document.getElementById("t_con1").innerText ;
              
//                document.getElementById("document.countryName").value=countryname;
               
                document.getElementById("document.typeName").value=typename;
                      
                document.getElementById("document.productName").value=producetname;
                   
                document.getElementById("groupname").value=groupname;
                var dname=document.getElementById("document.inputName").value;
                if(CheckForm(dname))
                {
                    document.getElementById("document.name").value = document.getElementById("document.inputName").value;
                 
                    document.form.submit();
                }
              
               
            }

            function    contain(str,charset)//    字符串包含测试函数
            {  
                var    i;
                for(i=0;i<charset.length;i++)
                    if(str.indexOf(charset.charAt(i))>=0)
                        return    true;
                return    false;
            }

            function    CheckForm(str)
            {  
                if((contain(str,"+|&;$@'\"%()><")))
                {  
                  
          
                    return    false;
                }
                return    true;
            }
        </script>
        <script type="text/javascript">
            $(document).ready(function(){
                $("#cplb_tab1").mouseover(function(){
                    $("#cplb_tab1").css("background","#D3E0F3");
                    $("#cplb_tab1").css("border-right","0");
                    $("#cplb_tab1").css("border-left","2px solid #F3BE18");
                    $("#cplb_tab1").css("border-top","2px solid #F3BE18");
                    $("#cplb_tab1").css("border-bottom","2px solid #F3BE18");
                    $("#cplb_nav1").css("display","block");
                    $("#cplb_nav2").css("display","none");
                    $("#cplb_nav3").css("display","none");
                    $("#cplb_tab2").css("background","#EAF1F7");
                    $("#cplb_tab2").css("border-top","0");
                    $("#cplb_tab2").css("border-right","2px solid #F3BE18");
                    $("#cplb_tab2").css("border-bottom","1px dotted #96A6BD");
                    $("#cplb_tab3").css("background","#EAF1F7");
                    $("#cplb_tab3").css("border-right","2px solid #F3BE18");
                    $("#cplb_tab3").css("border-bottom","1px dotted #96A6BD");
                    $("#cplb_tab3").css("border-top","0");
                });

                $("#cplb_tab2").mouseover(function(){
                    $("#cplb_tab2").css("background","#D3E0F3");
                    $("#cplb_tab2").css("border-right","0");
                    $("#cplb_tab2").css("border-left","2px solid #F3BE18");
                    $("#cplb_tab2").css("border-top","2px solid #F3BE18");
                    $("#cplb_tab2").css("border-bottom","2px solid #F3BE18");
                    $("#cplb_nav2").css("display","block");
                    $("#cplb_nav1").css("display","none");
                    $("#cplb_nav3").css("display","none");
                    $("#cplb_tab1").css("background","#EAF1F7");
                    $("#cplb_tab1").css("border-top","0");
                    $("#cplb_tab1").css("border-right","2px solid #F3BE18");
                    $("#cplb_tab1").css("border-bottom","1px dotted #96A6BD");
                    $("#cplb_tab3").css("background","#EAF1F7");
                    $("#cplb_tab3").css("border-right","2px solid #F3BE18");
                    $("#cplb_tab3").css("border-bottom","1px dotted #96A6BD");
                    $("#cplb_tab3").css("border-top","0");
                });

                $("#cplb_tab3").mouseover(function(){
                    $("#cplb_tab3").css("background","#D3E0F3");
                    $("#cplb_tab3").css("border-right","0");
                    $("#cplb_tab3").css("border-left","2px solid #F3BE18");
                    $("#cplb_tab3").css("border-top","2px solid #F3BE18");
                    $("#cplb_tab3").css("border-bottom","2px solid #F3BE18");
                    $("#cplb_nav3").css("display","block");
                    $("#cplb_nav1").css("display","none");
                    $("#cplb_nav2").css("display","none");
                    $("#cplb_tab2").css("background","#EAF1F7");
                    $("#cplb_tab2").css("border-top","0");
                    $("#cplb_tab2").css("border-right","2px solid #F3BE18");
                    $("#cplb_tab2").css("border-bottom","1px dotted #96A6BD");
                    $("#cplb_tab1").css("background","#EAF1F7");
                    $("#cplb_tab1").css("border-right","2px solid #F3BE18");
                    $("#cplb_tab1").css("border-bottom","1px dotted #96A6BD");
                    $("#cplb_tab1").css("border-top","0");
                });

                $("#cplb_eav").mouseover(function(){
                    $("#cplb_big").css("display","block");
                });
                $("#cplb_eav").mouseout(function(){
                    $("#cplb_big").css("display","none");
                });
                $("#cplb_big").mouseover(function(){
                    $("#cplb_big").css("display","block");
                });
                $("#cplb_big").mouseout(function(){
                    $("#cplb_big").css("display","none");
                });
            });
        </script>
        <script type="text/javascript">
            function nav5(id){
                if(document.getElementById(id).innerHTML=="所有(清空条件)"){
                    document.getElementById('text5').innerHTML=""
                    document.getElementById('document.productName').value ="";
                    document.getElementById('document.product.id').value=-1;
                }
                else{
                    document.getElementById('text5').innerHTML= document.getElementById(id).innerHTML
                    document.getElementById('document.productName').value= document.getElementById(id).innerHTML;
          
                    document.getElementById('document.product.id').value=id;
                }
            
                $("#cplb_big").css("display","none");
            };
        </script>


        <!--        国家js开始
                <script type="text/javascript">
                    var menuids=["suckertree"]
        
                    function buildsubmenus(){
                        for (var i=0; i<menuids.length; i++){
                            var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
                            for (var t=0; t<ultags.length; t++){
                                ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
                                ultags[t].parentNode.onmouseover=function(){
                                    this.getElementsByTagName("ul")[0].style.display="block"
                                }
                                ultags[t].parentNode.onmouseout=function(){
                                    this.getElementsByTagName("ul")[0].style.display="none"
                                }
                            }
                        }
                    }
        
                    if (window.addEventListener)
                        window.addEventListener("load", buildsubmenus, false)
                    else if (window.attachEvent)
                        window.attachEvent("onload", buildsubmenus)
                </script>
                <script type="text/javascript">
                    function nav(id){
                        if(document.getElementById(id).innerHTML=="所有(清空条件)"){
                            document.getElementById('text').innerHTML="";
                            document.getElementById('document.country.id').value=-1;
                            document.getElementById('document.countryName').value="";
                            $(".suckertree_ul").css("display","none");
                        }
                        else{
                            document.getElementById('text').innerHTML= document.getElementById(id).innerHTML;
                            document.getElementById('document.country.id').value=id.substring(1);
                            document.getElementById('document.countryName').value=document.getElementById(id).innerHTML;
                            $(".suckertree_ul").css("display","none");
                        }
        
                    };
                </script>
                国家js结束-->

        <!--单证性质js开始-->
        <script type="text/javascript">
            var menuids1=["suckertree1"]

            function buildsubmenus1(){
                for (var i=0; i<menuids1.length; i++){
                    var ultags1=document.getElementById(menuids1[i]).getElementsByTagName("ul")
                    for (var t=0; t<ultags1.length; t++){
                        ultags1[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
                        ultags1[t].parentNode.onmouseover=function(){
                            this.getElementsByTagName("ul")[0].style.display="block"
                        }
                        ultags1[t].parentNode.onmouseout=function(){
                            this.getElementsByTagName("ul")[0].style.display="none"
                        }
                    }
                }
            }

            if (window.addEventListener)
                window.addEventListener("load", buildsubmenus1, false)
            else if (window.attachEvent)
                window.attachEvent("onload", buildsubmenus1)
        </script>
        <script type="text/javascript">
            function nav1(id){
                
                if(document.getElementById(id).innerHTML=="所有(清空条件)"){
                    document.getElementById('text1').innerHTML="";
                    $(".suckertree_ul").css("display","none");
                    document.getElementById("groupname").value="";
                }
                else{
                    document.getElementById('text1').innerHTML= document.getElementById(id).innerHTML;
                    
                    $(".suckertree_ul").css("display","none");
                    document.getElementById("groupname").value=document.getElementById(id).innerHTML;
                }
                var name=document.getElementById("document.inputName").value;
                document.getElementById("document.name").value=name;
                var form = document.getElementById("form");
                form.submit();
                 
            };
        </script>
        <!--单证性质js结束-->

        <!--单证类别js开始-->
        <script type="text/javascript">
            //        var menuids2=["suckertree2"]
            //
            //        function buildsubmenus2(){
            //            for (var i=0; i<menuids2.length; i++){
            //                var ultags2=document.getElementById(menuids2[i]).getElementsByTagName("ul")
            //                for (var t=0; t<ultags2.length; t++){
            //                    ultags2[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
            //                    ultags2[t].parentNode.onmouseover=function(){
            //                        this.getElementsByTagName("ul")[0].style.display="block"
            //                    }
            //                    ultags2[t].parentNode.onmouseout=function(){
            //                        this.getElementsByTagName("ul")[0].style.display="none"
            //                    }
            //                }
            //            }
            //        }
            //
            //        if (window.addEventListener)
            //            window.addEventListener("load", buildsubmenus2, false)
            //        else if (window.attachEvent)
            //            window.attachEvent("onload", buildsubmenus2)
        </script>
        <script type="text/javascript">
            function nav2(id){
              
                if(document.getElementById(id).innerHTML=="所有(清空条件)"){
                    document.getElementById('text2').innerHTML="";
                }
                else
                    document.getElementById('text2').innerHTML= document.getElementById(id).innerHTML

            };
        </script>
        <!--单证类别js结束-->
    </head>
    <body>
        <a name="top"></a>

        <div class="page">
            <s:include value="/top1.jsp"/>

            <!--首页开始-->
			<div class="clear"></div>
            <div class="cont">
                <div class="lb_select"  style="position:relative;">


                    <s:form action="findlist" namespace="/document" method="post" theme="simple" id="form">
                        <s:hidden id="page" name="page" value="1"></s:hidden>
                        <s:hidden id="pageSize" name="pageSize"></s:hidden>
                        <s:hidden id="document.countryName" name="document.countryName"></s:hidden>
                        <s:hidden id="document.country.id" name="document.country.id"></s:hidden>
                        <s:hidden id="document.typeName" name="document.typeName"></s:hidden>
                        <s:hidden id="document.productName" name="document.productName"></s:hidden>
                        <s:hidden id="document.product.id" name="document.product.id" value="-1" ></s:hidden>
                        <s:hidden id="groupname" name="groupname"></s:hidden>
                        <s:hidden id="document.name" name="document.name"></s:hidden>
                       



                    </s:form>
                    <table width="100%" border="0" cellpadding="0" cellspacing="0"  style="z-index:-100">
                        <tr>
                            
                            <td width="8%">单证名称：</td>
                            <td width="14%">

                              
                                <div class="suckerdiv">

                                    <input id="document.inputName" name="document.name" value="${document.name}" style="width: 100px;" />
                                 
                                </div>
                              
                            </td>
                            <td width="8%">单证性质：</td>
                            <td width="15%">
                              
                                <div class="suckerdiv">
                                    <ul id="suckertree1">
                                        <li class="suckerdiv_li"><a href="#" id="text1" style=" padding-left:5px;border:1px solid #cccccc;">${groupname}</a>
                                            <ul class="suckertree_ul" style="right:-7px;_right:0px;z-index:0">
                                                <li class="suckertree_ul_li" style="z-index:998"><a href="#" style="z-index:998;width:398px;" id="fonta998" onClick="nav1('fonta998')">所有(清空条件)</a>
                                                    <s:iterator value="propertyList" var="c" status="u">
                                                    <li class="suckertree_ul_li" style="z-index:-${u.index}"><a href="#" style="z-index:-${u.index}" id="fonta${u.index}" onClick="nav1('fonta${u.index}')">${c.name}</a>

                                                        <ul>
                                                            <s:iterator value="#c.list" var="cc" status="uu">
                                                                <li><a href="#" id="a${cc.id}" onClick="nav1('a${cc.id}')">${cc.name}</a></li>
                                                            </s:iterator>
                                                        </ul>

                                                    </li>
                                                </s:iterator>
                                            </ul>
                                        </li>
                                    </ul>
                                </div>
                             
                            </td>
                            <td width="8%">单证类型：</td>
                            <td width="15%">
							    <div id="t_con1" style="background:url(../images/jiansuo_bg.jpg) no-repeat right;color:#444444; height:23px; line-height:23px;background-color:#ffffff; overflow: hidden;" onMouseOver="showarea1();clearTimeout(timer1)" onMouseOut="timer1=setTimeout('offarea1()',200);">${document.typeName}</div> 
                                <div style="position:relative; z-index: 100001; float:left; z-index: 100001; width:80px; height:25px; margin-top:3px; ">
                                    <div id="t_area1" onMouseOver="showarea1()" onMouseOut="offarea1();clearTimeout(timer1)"> 
                                        <ul> 
                                            <li style="height:auto;width:528px"><a href="#">所有(清空条件)</a></li> 

                                        </ul>
										<%--
                                        <s:iterator value="typeList" var="t" status="u">
                                            <ul> 
                                                <li style="height:auto"><a href="#">${t.name}</a></li> 

                                            </ul> 
                                        </s:iterator>
										--%>
										<div>
                                        <s:iterator value="typeList" var="t" status="u">
                                            <span style="float: left; white-space: nowrap; ">&nbsp;&nbsp;|&nbsp;<a href="#">${t.name}</a></span>
                                        </s:iterator>
									    </div>
                                    </div> 
                                </div>
                            </td>
                           
                            <td width="10%"><img onclick="check()" src="${pageContext.request.contextPath}/images/lb_select_anniu.jpg"/></td>
                        </tr>
                    </table>

                </div>

                <!--                <div class="lb_select_huitui">首页 &gt;&gt; 产品目录 &gt;&gt; 工业设备及组件 &gt;&gt; 净化过滤和水处理设备 &gt;&gt; 过滤机，过滤器</div>
                --><div class="lb_cont" style="width:950px;padding:10px 0 10px 0;">
                    <div class="lb_select_inf" style="width:933px;"> <span>共有<font style="color:#E9503E; font-weight:bold">${pageBean.allRow}</font>个单证</div>
                            <s:iterator value="pageBean.list" var="dc" status="u">
                        <div class="lb_cont_1">
                            <div class="lb_cont_1_left">
                                <ul>
                                    <li class="lb_cont_1_li1"><span>${dc.name}</span><font>&nbsp;&nbsp; [单证类型:${dc.documentType.name}]</font></li>
                                    <li><font style="color:#F68E02">作用和说明：</font>${dc.useful}</li>
                                    <li><font style="color:#F68E02">重要制作规定：</font>${dc.feature}</li>

                                    <li class="lb_cont_1_li2">适用产品：${dc.product.name} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 适用采购国：${dc.country.name}</li>
                                </ul>
                            </div>
                            <div class="lb_cont_1_right"><a href="${pageContext.request.contextPath}/document/show.action?document_id=${dc.id}"><img src="${pageContext.request.contextPath}/images/lb_ent.jpg"/></a></div>
                        </div>
                    </s:iterator>

                </div>


            </div>
            <div class="fanye" style="float: left; margin: 0 auto; text-align:  center; "><s:include value="/common/page.jsp"/></div>
            <div class="clear"></div>
            <s:include value="/bottom.jsp"/>
        </div>

        <!--首页结束-->
        <a name="bottom"></a>
    </div>
    <!-- /header -->
    <div class="w960"> </div>
    <!-- /flink -->
    <!-- //底部模板 -->
    <div id="js">
        <script type="text/javascript" src="common.js"></script>
        <script type="text/javascript" src="scroll.js"></script>
        <div id="go_top_bottom"><a href="javascript:void(0);" id="go_top" style="display: block;">去顶部</a> <a href="javascript:void(0);" id="go_bottom">去底部</a></div>
    </div>
    <div id="menuContent" class="menuContent" style="display:none; position: absolute;">
        <ul id="treeDemo" class="ztree" style="margin-top:0; width:160px;"></ul>
    </div>
    <!-- /footer -->
    <s:form action="findlist" namespace="/document" method="post" theme="simple" id="form1">
              <s:token /><!-- 防止表单重复提交 -->
             </s:form>
</body>

</html>
